<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" content="">
		<meta name="author" content="">
		<link rel="icon" href="../../favicon.ico">
		<title>--欢迎注册--</title>

		<!-- Bootstrap core CSS -->
		<link rel="stylesheet" href="assets/css/bootstrap.css" />
		<!-- Custom styles for this template -->
		<link rel="stylesheet" href="assets/css/register.css" />
		<script src="../../assets/js/ie-emulation-modes-warning.js"></script>

	</head>

	<body>
		<div class="container">
			<div class="row">
				<div class="loginbg col-md-offset-4 col-md-4  col-sm-offset-3 col-sm-6 col-xs-offset-3 col-xs-6">
					<form class="form-register" method="post" action="#">
						<h3>免费注册</h3>
						<label for="inputEmail" class="sr-only">Email address</label>
						<div class="input-group col-md-offset-1 col-md-10  col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10">
							<input type="email" id="inputEmail" name="inputEmail" class="form-control" placeholder="请填写邮箱" required autofocus>
						</div>
						<label for="inputPassword1" class="sr-only">Password</label>
						<div class="input-group col-md-offset-1 col-md-10  col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10">

							<input type="password" id="inputPassword1" name="inputPassword1" class="form-control" placeholder="请输入密码" required autofocus>
							<input type="hidden" id="pwd1" name="user_psw1" class="form-control">
						</div>
						<label for="inputPassword2" class="sr-only">Password</label>
						<div class="input-group col-md-offset-1 col-md-10  col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10">

							<input type="password" id="inputPassword2" name="inputPassword2" class="form-control" placeholder="请再次输入密码" required autofocus>
							<!--<input type="hidden" id="pwd2" name="user_psw1" class="form-control">-->

						</div>
						<div class="input-group col-md-offset-1 col-md-10  col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10">
							<select id="question1" name="questions1" class="form-control" style="height: auto;">
								<option value="--密保问题1--">--密保问题1--</option>
								<option value="您父亲的名字是？">您父亲的名字是？</option>
								<option value="您母亲的名字是？">您母亲的名字是？</option>
								<option value="您配偶的名字是？">您配偶的名字是？ </option>
								<option value="您的出生地是？    "> 您的出生地是？</option>
							</select>
						</div>
						<div class="input-group col-md-offset-1 col-md-10  col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10">
							<input type="text" name="text1" class="form-control" placeholder="请输入问题答案">
						</div>

						<div class="input-group col-md-offset-1 col-md-10  col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10">
							<select id="question2" name="question2" class="form-control" style="height: auto;">
								<option value="--密保问题2--">--密保问题2--</option>

								<option value="您高中班主任的名字是？">您高中班主任的名字是？</option>
								<option value="您初中班主任的名字是？">您初中班主任的名字是？</option>
								<option value="您的小学校名是？">您的小学校名是？ </option>
								<option value="您的学号（工号）是？">您的学号（工号）是？ </option>
							</select>
						</div>

						<div class="input-group col-md-offset-1 col-md-10  col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10">
							<input type="text" name="text2" class="form-control" placeholder="请输入问题答案">
						</div>
						
						<input class="btn btn-lg btn-primary btn-block" type="submit" value="提交注册" onclick="return MD5()"></input>
					</form>
				</div>
			</div>
			<!-- /container -->

	</body>
	<script type="text/javascript">
		function MD5() {

			var password1 = document.getElementById("inputPassword1").value
			var password2 = document.getElementById("inputPassword2").value
			if(password1 == password2) {
				var hash = md5(password1);
				document.getElementById("pwd1").value = hash
//				alert(hash);
//				alert(password1);
				return true;
			} else {
				alert("两次输入的密码不一致！");
				return false;

			}

		}
	</script>
	<script src="http://cdn.bootcss.com/blueimp-md5/1.1.0/js/md5.js"></script>

	<script src="http://cdn.bootcss.com/blueimp-md5/1.1.0/js/md5.min.js"></script>

</html>